package com.thb.pay.api.sys;

import com.thb.pay.core.utils.PageResult;
import com.thb.pay.vo.req.SysRolePageReq;
import com.thb.pay.vo.req.SysRoleReq;
import com.thb.pay.vo.resp.SysRoleVo;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Slf4j
@Component
public class SysRoleServiceApiFallbackFactory implements FallbackFactory<SysRoleServiceApi> {


    @Override
    public SysRoleServiceApi create(Throwable throwable) {
        return new SysRoleServiceApi() {

            @Override
            public PageResult<SysRoleVo> findPage(@RequestBody SysRolePageReq pageReq) {
                return null;
            }

            @Override
            public void addRole(@RequestBody SysRoleReq sysRole) {

            }

            @Override
            public void updateRole(@RequestBody SysRoleReq sysRole) {

            }

            @Override
            public SysRoleVo getByRoleId(@RequestParam("roleId") Long roleId) {
                return null;
            }

            @Override
            public List<SysRoleVo> findAllRoles() {
                return null;
            }

            @Override
            public void deleteBatchRoleIds(@RequestBody List<Long> roleIds) {

            }
        };
    }
}